package com.kakarote.hrm.constant;

import lombok.Getter;

/**
 * @author hmb
 */

@Getter
public class RecruitUserConstant {

    public enum TechnologyTypeEnum {
        /**
         * 专业技术职务类别
         */
        ONE(1, "初级工"),
        TWO(2, "中级工"),
        THREE(3, "高级工"),
        FOUR(4, "技师"),
        FIVE(5, "高级技师"),
        ;

        TechnologyTypeEnum(Integer value, String name) {
            this.value = value;
            this.name = name;
        }


        private Integer value;
        private String name;

        public static String valueOfName(Integer value) {
            for (TechnologyTypeEnum item : values()) {
                if (item.value == value) {
                    return item.name;
                }
            }
            return null;
        }

        public static Integer valueOfType(String name) {
            for (TechnologyTypeEnum item : values()) {
                if (item.name.equals(name)) {
                    return item.value;
                }
            }
            return null;
        }
    }

    public enum TechnicalLevelEnum {
        /**
         * 专业技术职务类别
         */
        ONE(1, "初级"),
        TWO(2, "中级"),
        THREE(3, "正高级"),
        FOUR(4, "高级"),
        ;

        TechnicalLevelEnum(Integer value, String name) {
            this.value = value;
            this.name = name;
        }


        private Integer value;
        private String name;

        public static String valueOfName(Integer value) {
            for (TechnicalLevelEnum item : values()) {
                if (item.value == value) {
                    return item.name;
                }
            }
            return null;
        }

        public static Integer valueOfType(String name) {
            for (TechnicalLevelEnum item : values()) {
                if (item.name.equals(name)) {
                    return item.value;
                }
            }
            return null;
        }
    }


    public enum EducationEnum {
        /**
         * 学历
         */

        ONE(1, "小学"),
        TWO(2, "初中"),
        THREE(3, "高中"),
        FOUR(4, "中专"),
        FIVE(5, "大专"),
        SIX(6, "大学"),
        SEVEN(7, "硕士研究生"),
        EIGHT(8, "博士研究生"),
        NONE(0, "无");

        EducationEnum(Integer value, String name) {
            this.value = value;
            this.name = name;
        }


        private Integer value;
        private String name;

        public static String valueOfName(Integer value) {
            for (EducationEnum item : values()) {
                if (item.value == value) {
                    return item.name;
                }
            }
            return null;
        }

        public static Integer valueOfType(String name) {
            for (EducationEnum item : values()) {
                if (item.name.equals(name)) {
                    return item.value;
                }
            }
            return null;
        }
    }

    public enum RecruitChannelEnum {
        /**
         * 招聘渠道
         */
        ONE(1, "校招"),
        TWO(2, "社招");

        RecruitChannelEnum(Integer value, String name) {
            this.value = value;
            this.name = name;
        }


        private Integer value;
        private String name;

        public static String valueOfName(Integer value) {
            for (RecruitChannelEnum item : values()) {
                if (item.value == value) {
                    return item.name;
                }
            }
            return null;
        }

        public static Integer valueOfType(String name) {
            for (RecruitChannelEnum item : values()) {
                if (item.name.equals(name)) {
                    return item.value;
                }
            }
            return null;
        }
    }
}
